package ch07;

import com.sun.org.apache.xpath.internal.SourceTree;

import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
import java.util.Random;
import java.util.Scanner;
/**
 * Created by hasee on 2017/6/20.
 */
public class PrintInt {
    public static void main(String[] args) {
        int a;
        int Max = 9;
        final int num1 = 100;
        Random fuck = new Random();
        final int 次数 = 10;
        int[] 数组 = new int[次数];
        int [] num = new int[num1];

        for (int c = 0; c <= Max; c++) {
            for (int i = 0; i < 次数; i++) {
                a = fuck.nextInt(51);
                数组[i] = a;
                num[a]++;
            }
            for (int z = 0; z <= Max; z++)
                System.out.print(数组[z] + "\t");
            System.out.println();
        }
        for (int i=0;i<num1;i++){
            System.out.println(i+1+"有"+num[i]);
        }
    }
}
//修改到pp7.2的目标